import { Component, OnInit, EventEmitter, Input, Output } from '@angular/core';



@Component({
  selector: 'el-dropdown-item',
  templateUrl: './dropdown-item.component.html'
})
export class DropdownItemComponent implements OnInit {
  @Input() model!: any;
  @Input() disabled:boolean=false;
  @Input() divided:boolean=false;
  @Output('command') selected: EventEmitter<any> = new EventEmitter();

  constructor() { }

  ngOnInit(): void {
  }

  handleClick(event: Event) {
    if (this.model.elDisabled)
      return;
    event.stopPropagation();
    this.selected.emit(this.model);
  }
}
